from __future__ import annotations

from dataclasses import dataclass
import os


@dataclass(frozen=True)
class MongoConfig:
    """MongoDB 连接配置，支持环境变量覆盖。"""
    mongo_uri: str = os.getenv("MONGO_URI", "mongodb://localhost:27017/")
    database: str = os.getenv("MONGO_DB", "quantcore")


@dataclass(frozen=True)
class AppConfig:
    """应用全局配置入口。"""
    mongo: MongoConfig = MongoConfig()


CONFIG = AppConfig()




